#include <stdio.h>
#include "obj.h"
classdef(Firecracker);
class(Firecracker,public(
    int counts;
    void (*sound)();
));
method(Firecracker, void, sound)(){
    obj_prepare(Firecracker);
    for(int i=0; i<self->counts; i++)
        printf("pilipala\n");
}
ctor(Firecracker)(int counts){
    obj_setup(Firecracker);
    obj_bind(Firecracker, sound);
    self->counts = counts;
    obj_done(Firecracker);
}
int main(){
    Firecracker firecracker = new(Firecracker)(10);
    firecracker->sound();
    firecracker->base.release();
    return 0;
}